<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	template="../../layout/template.xhtml">

	<ui:define name="body">

		<h:form styleClass="form-horizontal">
			<fieldset>
				<legend>#{aeronave.id eq null ? 'Incluir' : 'Alterar'} Aeronave</legend>
				<s:decorate id="nomeAeronaveField" template="../../layout/edit.xhtml">
					<ui:define name="label">#{label['label.nome.aeronave']}</ui:define>
					<h:inputText id="nomeAeronave" size="45" maxlength="45" required="true"
						value="#{aeronave.nomeAeronave}" requiredMessage="Campo obrigatório">
					</h:inputText>
				</s:decorate>
				<s:decorate id="statusField" template="../../layout/edit.xhtml">
					<ui:define name="label">#{label['label.status.aeronave']}</ui:define>
					<h:selectOneMenu value="#{aeronave.status}" required="true" requiredMessage="Campo obrigatório">
						<s:selectItems noSelectionLabel="Selecione" value="#{factoryStatusAeronave}" var="status" label="#{status.valor}" />
						<s:convertEnum />
					</h:selectOneMenu>
				</s:decorate>
				
				<s:decorate template="../../layout/controls.xhtml">
					<span class="required">*</span> #{label['label.campos.obrigatorios']}
				</s:decorate>
				
				<s:decorate template="../../layout/controls.xhtml">
					<h:commandButton id="save" value="#{label['botao.avancar']}"
						action="#{manterAeronaveAction.avancar}" styleClass="btn btn-success" />
					<h:commandButton id="cancel" value="#{label['botao.cancelar']}" immediate="true"
						action="#{manterAeronaveAction.cancel}" styleClass="btn btn-danger"  />
				</s:decorate>
				
			</fieldset>
		</h:form>
	</ui:define>
</ui:composition>
